import get from '@dfeidao/atom-web/global/get';
import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p002 from './p002';

export default async function a008(fd: IFeidaoAiBrowserComponent) {
	// todo
	const arr1 = get('arr');
	const d = get('d');
	const zhankai = fd.data.node.querySelector<HTMLDivElement>('[data-id="icon-up"]');
	set_node_cls(zhankai, 'display-n', false);
	const suojin = fd.data.node.querySelector<HTMLDivElement>('[data-id="icon-down"]');
	set_node_cls(suojin, 'display-n', true);
	const arr2 = Array();
	for (let j = 7; j < d; j++) {
		arr2.push(arr1[j]);
	}
	render(fd, arr2, p002, 'p002', 'lastin');
}
